package dbutil;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Dbutil {
	static String url="jdbc:mysql://localhost:3306/clock?useUnicode=true&characterEncoding=utf8";
	static String user="root";
	static String pass="";
	
	
	public static Connection getConn(){
		Connection conn=null;
		try {
			Class.forName("com.mysql.jdbc.Driver"); 
			 conn=DriverManager.getConnection(url, user, pass);
			 System.out.println(conn);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}
	
	public static void main(String[] args) {
		Dbutil.getConn();
		
	}
	
}
